<?php
namespace common\components;

use Yii;

class AccessControl extends \mdm\admin\components\AccessControl{

    protected function denyAccess($user){
        try{
            parent::denyAccess($user);
        }catch (\Exception $e){
            $info = [];
            if(!$user->getIsGuest()){
                $info[] = 'user:'.$user->name;
            }
            $info[] = Yii::$app->request->getUrl();
            $info = implode("\t", $info);
            Yii::error($info."\t".$e->getMessage());
            throw $e;
        }
    }
}